# Contributor: Isaac Dunham <ibid.ag@gmail.com>
# Maintainer:
pkgname=py3-cycler
_pkgname=cycler
pkgver=0.12.1
pkgrel=1
pkgdesc="Composable style cycles in Python"
url="https://matplotlib.org/cycler/"
arch="noarch"
license="BSD-3-Clause"
depends="python3"
makedepends="py3-gpep517 py3-installer py3-setuptools py3-wheel"
checkdepends="py3-pytest"
subpackages="$pkgname-pyc"
source="$pkgname-$pkgver.tar.gz::https://github.com/matplotlib/cycler/archive/refs/tags/v$pkgver.tar.gz"
builddir="$srcdir/$_pkgname-$pkgver"

replaces="py-cycler" # Backwards compatibility
provides="py-cycler=$pkgver-r$pkgrel" # Backwards compatibility

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

check() {
	python3 -m venv --clear --without-pip --system-site-packages .testenv
	.testenv/bin/python3 -m installer .dist/*.whl
	.testenv/bin/python3 -m pytest
}

package() {
	python3 -m installer -d "$pkgdir" \
		.dist/*.whl
}

sha512sums="
f1d264de9c5e63515649aefb5937ef7a85d781c07b1c7c8fe291c969565abb18eb48d6d62f77d278746c60900c93700cbb095d280e09de768aedc2463e60d9a2  py3-cycler-0.12.1.tar.gz
"
